import axios from '../../../plugins/axios'
import { OrderActionsEnum } from '../../../_/vue/store/order'
export default {
  [OrderActionsEnum.LIST] ({ commit }, params) {
    return axios.get('/orders', { params })
  },
  [OrderActionsEnum.EDIT] ({ commit }, orderNo) {
    return axios.get(`/orders/${orderNo}`)
  },
  [OrderActionsEnum.SAVE] ({ commit }, payload) {
    return axios.post(`/orders/${payload.id}`, payload.data)
  }
}
